*** Settings ***
Library           FN

*** Test Cases ***
http用例
    [Tags]    normal
    Init Step
    ${uri}    Set Variable    /opc/account/queryIdentity
    ${customerId}    Set Variable
    ${pageNo}    Set Int Variable    1
    ${pageSize}    Set Int Variable    2
    ${platformType}    Set Variable
    ${serviceType}    Set Variable
    ${status}    Set Variable
    Redis Step
    Connect To Redis    ${OPC_REDIS_URL}    ${OPC_REDIS_ALIAS}
    Mysql Step
    Connect To Database    pymysql    ${OPC_DB_URL}    ${OPC_DB_ALIAS}
    Doing Step
    ${post_data}    Create Dictionary
    Set To Dictionary    ${post_data}    customerId    ${customerId}
    Set To Dictionary    ${post_data}    pageNo    ${pageNo}
    Set To Dictionary    ${post_data}    pageSize    ${pageSize}
    Set To Dictionary    ${post_data}    platformType    ${platformType}
    Set To Dictionary    ${post_data}    serviceType    ${serviceType}
    Set To Dictionary    ${post_data}    status    ${status}
    ${cookies}    Get Http Cookie    ${BOSS_HOST}    ${BOSS_LOGIN_URI}    ${BOSS_USER_ADMIN}
    ${resp}    Http Post    ${OPC_HOST}    ${uri}    ${post_data}    JSON    ${cookies}
    Check Step
    Redis Key Should Not Be Exist    ${OPC_REDIS_ALIAS}    1
    Validate Schema    ${resp}
    ${username}    Create Order
    Close Step
    Close Database    ${OPC_DB_ALIAS}
    Close Redis    ${OPC_REDIS_ALIAS}

Dubbo用例
    [Tags]    normal
    Init Step
    ${interface}    Set Variable    cn.com.servyou.business.numen.facade.customer.PcCustomerFacade
    ${method}    Set Variable    listByIds
    ${idList}    Create List    123123
    Mysql Step
    ${post_data}    Create Dictionary
    Set To Dictionary    ${post_data}    idList    ${idList}
    Doing Step
    ${resp}    Dubbo Invoke    ${NUMEN_ZK_ADDR}    ${interface}    ${method}    ${post_data}
    Check Step
    Validate Schema    ${resp}
    Close Step

Demo
    Close Step
